<section ng-controller="msgFlowController">
    <div class="container container-msg col-thin">
        <div class="row">
            <div class="col-xs-12 col-panel-profile center">
                <h4 id="publisherName"><{$publisher_name}></h4>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-12 wrap-col-cont">
                <ul class="ul-msgflow">
                    <li ng-repeat="message in msg" msg-filter ng-class="{ 1:'li-msgflow-other', 2:'li-msgflow-self' }[message.is_self]">

                        <a ng-href="<{:U('FetcherInfo/index')}>/user_id/{{ message.publisher_id }}">
                            <div class="msg-avatar">
                                <img ng-src="__UPLOAD__/{{ message.image_url }}" width="45px" height="45px"/>
                            </div>
                        </a>
                            <div class="msg-tail"></div>
                            <div class="pop-content" ng-class="{ titled: message.mission_name }">
                                <a ng-show="message.mission_name" ng-href="{{ message.url }}">
                                    <span class="icon-msg-title"></span>
                                    <span class="msg-title">{{ message.mission_name }}</span>
                                </a>
                                <p>{{ message.content }}</p>
                            </div>

                    </li>
                </ul>
            </div>
        </div>
    </div>

    <div class="form-group input-msg">
        <div class="col-xs-12">
            <input type="text" id="inputMsg" class="form-control"
                   ng-init="content = ''" ng-model="content" placeholder="输入你的留言"/>
            <a href="javascript:;" onclick="submitMsg()">发送</a>
            <input type="hidden" id="receiverId" value="<{$receiver_id}>"/>
        </div>
    </div>
</section>

<script>
    function submitMsg() {
        var appElement = document.querySelector('[ng-controller=msgFlowController]');
        angular.element(appElement).scope().submitMsg();
    }
</script>

